Implement Mixed Mode State Detection#1396
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1396 +/- ##
==========================================
+ Coverage 77.96% 78.11% +0.15%
==========================================
Files 184 187 +3
Lines 24907 25446 +539
==========================================
+ Hits 19419 19878 +459
- Misses 4179 4249 +70
- Partials 1309 1319 +10
🚀 New features to boost your workflow:
|
0fea7b3 to
c0064c0
Compare
yanjunz97
reviewed
Apr 1, 2026
0f8b260 to
5af4a3f
Compare
6e1cc2d to
c0b5bbb
Compare
yanjunz97
reviewed
Apr 16, 2026
0858f1b to
40a6a6a
Compare
Contributor
Author
|
/e2e |
Contributor
Author
|
/e2e |
dantingl
reviewed
Jun 4, 2026
6d23475 to
7a77092
Compare
Contributor
Author
|
/e2e |
7c9bd2a to
43f7269
Compare
Contributor
Author
|
/e2e |
2a560f4 to
d81c765
Compare
TaoZou1
reviewed
Jun 29, 2026
468f567 to
4d2b6ca
Compare
Contributor
Author
|
/e2e |
This patch introduces the Mixed Mode state detection logic for NSX Operator to determine the network scope (T1, VPC, or VDS) it operates within. This is critical for deciding which controllers should be activated. Key features: - Introduced an informer for the NetworkSettings CR in the Controller Runtime cache to efficiently determine the global network state. - Added detection logic for VDS alongside T1 and VPC based on the NetworkSettings `provider` field. - Implemented capability checking by reading the `supports_per_namespace_network_provider` key from the `status.supervisor` path in the Capabilities CR. - Incorporated the `EnableVPCNetwork` configuration override to act as an early trigger. This solves the "chicken-and-egg" problem by allowing VPC-specific controllers to start before the NetworkSettings CRs are updated to `provider: vpc`. - Wrapped all corresponding controller capability gates to strictly use the global `config.HasVPCNamespaces()` and `config.HasT1Namespaces()` checks. After this change, the NSX-Operator will start VPC controllers as long as enable_vpc_network is true. And the T1 controllers will be started when: (supports_per_namespace_network_provider is activated) AND (at least one NetworkingSettings CR has provider=="nsx-tier1") OR (supports_per_namespace_network_provider is deactivated) AND (enable_vpc_network is false) Co-authored-by: Cursor <cursoragent@cursor.com>
TaoZou1
approved these changes
Jun 30, 2026
dantingl
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch introduces the Mixed Mode state detection logic for NSX Operator
to determine the network scope (T1, VPC, or VDS) it operates within. This
is critical for deciding which controllers should be activated.
Key features:
Runtime cache to efficiently determine the global network state.
NetworkSettings
providerfield.supports_per_namespace_network_providerkey from thestatus.supervisorpath in the SupervisorCapabilities CR.
EnableVPCNetworkconfiguration override to act as anearly trigger. This solves the "chicken-and-egg" problem by allowing
VPC-specific controllers to start before the NetworkSettings CRs are
updated to
provider: vpc.initialization and state refresh, which acts as an early trigger for
VPC-specific controllers.
After this change, the NSX-Operator will start VPC controllers as long as
enable_vpc_network is true. And the T1 controllers will be started when:
(supports_per_namespace_network_provider is activated) AND (at least one NetworkingSettings CR has provider=="nsx-tier1")
OR
(supports_per_namespace_network_provider is deactivated) AND (enable_vpc_network is false)
Testing done: